#import "OmDestinyVC.h"
#import "MLMSegmentManager.h"
#import "OmDestinyListVC.h"
@interface OmDestinyVC ()
@end
@implementation OmDestinyVC
#pragma mark - ConstructionScript
- (void)configSelf {
    [self setHiddenForTabBar:YES navigationBar:YES];
    self.title = ASLocalizedString(@"缘分记录");
}
- (void)allocateComponents {
    NSArray *titleList = @[ASLocalizedString(@"我喜欢的"),
                           ASLocalizedString(@"喜欢我的"),
                           ASLocalizedString(@"互相喜欢")];
    NSMutableArray *vcList = [NSMutableArray array];
    OmDestinyListVC *iLikeVc = [[OmDestinyListVC alloc] init];
    iLikeVc.listType = OmDestinyListVCTypeILike;
    [vcList addObject:iLikeVc];
    OmDestinyListVC *likeMeVc = [[OmDestinyListVC alloc] init];
    likeMeVc.listType = OmDestinyListVCTypeLikeMe;
    [vcList addObject:likeMeVc];
    OmDestinyListVC *likeEachOtherVc = [[OmDestinyListVC alloc] init];
    likeEachOtherVc.listType = OmDestinyListVCTypeWeLikeEachOther;
    [vcList addObject:likeEachOtherVc];
    MLMSegmentHead *segHead = [[MLMSegmentHead alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 40) titles:titleList headStyle:SegmentHeadStyleDefault layoutStyle:MLMSegmentLayoutDefault];
    MLMSegmentScroll *segScroll = [[MLMSegmentScroll alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(segHead.frame), SCREEN_WIDTH, WINDOW_HEIGHT-StatusBarHeight-NavigationBarHeight-40) vcOrViews:vcList];
    [MLMSegmentManager associateHead:segHead withScroll:segScroll completion:^{
        [self.view addSubview:segHead];
        [self.view addSubview:segScroll];
    }];
    self.sendGiftView = [[OmSendGiftView alloc] init];
    [self.view addSubview:self.sendGiftView];
    [self.sendGiftView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.bottom.equalTo(self.view);
    }];
    self.sendGiftView.hidden = YES;
}
- (void)showSendGift {
    self.sendGiftView.hidden = NO;
}
@end
